﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;

namespace RENIT.DragNDropUpload.Utils
{
    public class UploadTargetData
    {
        public Guid SiteId { get; set; }
        public Guid WebID { get; set; }
        public Guid ListID { get; set; }
        public string FolderUrl { get; set; }
        public string WPCellID { get; set; }
        public string Url 
        {
            get 
            { 
                var url = string.Format("/_layouts/RENIT.DNDUpload/UploadHandler.ashx?siteId={0}&webId={1}&listId={2}", SiteId, WebID, ListID);
                if (!string.IsNullOrEmpty(FolderUrl))
                {
                    url += "&folderUrl=" + HttpUtility.UrlEncodeUnicode(FolderUrl);
                }
                return url;
            } 
        }

        public string Title { get; set; }
    }
}
